﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchProfileByBarcode.ascx.cs" Inherits="VDC.VONE.WEB.Modules.SearchProfileByBarcode.Controls.SearchProfileByBarcode" %>
<%@ Import Namespace="VDC.COMMON" %>
<%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit, Version=4.1.7.429, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>
<%@ Register TagPrefix="uc1" TagName="Pager" Src="~/Controls/DataPager.ascx" %>
<table class="tbl_data" width="97%" cellspacing="0" cellpadding="0" align="center">
    <tr>
        <th align="left" valign="middle" style="border-right: 0px; padding-left: 8px" class="tab_selected">
            <img width="24" height="26" align="absmiddle" style="padding-right: 8px;" alt=""
                src='<%=this.ResolveUrl("~/Images/note.png") %>'>
            <asp:Label runat="server" ID="lblHeader" Text="TRA CỨU HỒ SƠ THEO MÃ" />
        </th>
    </tr>
    <tr>
        <td>
            <div style="margin-top: 10px;">
                <table cellpadding="0" cellspacing="1" style="width: 98%; margin: 0 auto;">
                    <tr>
                        <td class="css_gchu" style="width: 100px;">Mã hồ sơ:
                        </td>
                        <td style="width: 150px;">
                            <asp:TextBox ID="txtCode" CssClass="css_ma focus" runat="server" MaxLength="50" TabIndex="1"/>
                        </td>
                        <td>
                            <asp:Button ID="btnSearch" CssClass="css_button default" runat="server"
                                Text="Tra cứu" OnClick="BtnSearch_OnClick" TabIndex="2"/>
                        </td>
                    </tr>
                </table>
            </div>
        </td>
    </tr>
    <tr>
        <td align="center">
            <asp:Panel runat="server" ID="pnlSearch" Visible="True" Style="width: 98%">
                <div style="line-height: 30px;">
                    <div style="float: left;">
                        <asp:Label ID="lblMessage" EnableViewState="False" runat="server" />
                    </div>
                    <div style="float: right;">
                        <asp:Label ID="lblSum" runat="server" Text="Số lượng hồ sơ: " Font-Bold="True"></asp:Label>
                        <asp:Label ID="lblCount" runat="server" Text=""></asp:Label>
                    </div>
                </div>
                <div style="clear: both;"></div>
                <asp:GridView ID="GrvProfile" CssClass="grid_hs_tbl" CellPadding="0" CellSpacing="0"
                    GridLines="None" DataKeyNames="ProfileId,Code" AutoGenerateColumns="False" Width="100%"
                    runat="server"
                    ShowHeaderWhenEmpty="True"
                    OnRowDataBound="GrvProfileRowDataBound"
                    OnRowEditing="GrvProfileRowEditing">
                    <Columns>
                    <asp:TemplateField HeaderText="STT">
                        <HeaderStyle CssClass="grid_hs" Width="4%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblSTT" Text="100"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </asp:TemplateField>
                        <asp:TemplateField HeaderText="Mã hồ sơ">
                            <HeaderStyle CssClass="grid_hs" Width="8%" HorizontalAlign="Center"></HeaderStyle>
                            <ItemTemplate>
                                <%#PublicFuncs.HtmlEncode(Eval("Code"))%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tên hồ sơ">
                            <HeaderStyle CssClass="grid_hs" HorizontalAlign="Center"></HeaderStyle>
                            <ItemTemplate>
                                <%# string.Format("{0} - {1}", PublicFuncs.HtmlEncode(Eval("ProfileType.Code")), PublicFuncs.HtmlEncode(Eval("Name")))%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Ngày tiếp<br/>nhận">
                            <HeaderStyle CssClass="grid_hs" Width="8%" HorizontalAlign="Center"></HeaderStyle>
                            <ItemTemplate>
                                <%#Eval("ReceivingDate", "{0:dd/MM/yyyy}")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Ngày hẹn<br/>trả">
                            <HeaderStyle CssClass="grid_hs" Width="8%" HorizontalAlign="Center"></HeaderStyle>
                            <ItemTemplate>
                                <%#Eval("AppointmentDate", "{0:dd/MM/yyyy}")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tình trạng">
                            <HeaderStyle CssClass="grid_hs" Width="15%" HorizontalAlign="Center"></HeaderStyle>
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblTinhTrang" Text=""></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Trạng thái">
                            <HeaderStyle CssClass="grid_hs" Width="15%" HorizontalAlign="Center"></HeaderStyle>
                            <ItemTemplate>
                                <%#PublicFuncs.HtmlEncode(Eval("ProfileStatus.Name"))%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderStyle CssClass="grid_hs" Width="4%" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:Image runat="server" ID="imgOpen" ImageUrl="../../../Images/vb_close.png"/>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center"/>
                    </asp:TemplateField>
                    </Columns>
                    <PagerStyle HorizontalAlign="Right" BackColor="#FFFFFF"></PagerStyle>
                </asp:GridView>
                <div>
                    <div style="width: 50%; float: left; line-height: 30px;">
                        <ul class="ac_list">
                            <li class="li_sel" style="background: none; margin: 0;">
                                <asp:LinkButton style="padding: 0 5px;" ID="lbtDeleteAll" runat="server" 
                                    OnClientClick="return confirm('Bạn có chắc chắn muốn làm sạch lưới?');"
                                    CausesValidation="False" TabIndex="3" Text="Làm sạch lưới" OnClick="LbtDeleteAll_OnClick"/>
                            </li>
                        </ul>
                    </div>
                    <div style="width: 50%; float: right;">
                        <uc1:Pager ID="Pager1" runat="server" PageIndex="1" RecordsPerPage="10" TotalRecords="0"/>    
                    </div>
                </div>
            </asp:Panel>
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
        </td>
    </tr>
</table>
